package schoolWork.Test2;

import java.util.Scanner;

public class CapitalizationTransformation {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        String s = input.nextLine();
        String tmp = "";
        for(int i = 0; i < s.length(); i++)
        {
            char c = s.charAt(i);
            if(Character.isLowerCase(s.charAt(i)))
            {
                c = Character.toUpperCase(s.charAt(i));
            }
            if(Character.isUpperCase(s.charAt(i)))
            {
                c = Character.toLowerCase(s.charAt(i));
            }
            tmp += c;
        }
        System.out.println(tmp);
    }
}
